<?php include("conn.php");
mysql_query('SET NAMES UTF8'); 

class MyPrizeBean
{
	public $code;

	function __construct($code)
	{
		$this->code = $code;
	}
}

$state='2';
$query=mysql_query("select * from goodsorders where ordersid='".$_REQUEST[ordersid]."'");
if ($result=mysql_fetch_array($query)){
	$srat1=mysql_query("UPDATE goodsorders set state='".$state."' where ordersid='".$_REQUEST[ordersid]."'");
	
// 调用信息推送接口
$url = "http://120.24.0.10/xzpf/api/jpush/jpush.php?state=".$state."&ordersid=".$_REQUEST[ordersid];
file_get_contents($url);
// 调用信息推送接口 end
	
	if ($srat1==true) {
		$codes=100;
	}else{
		$codes=300;
	}
}else{
	$codes=200;
}
$prize[] = new MyPrizeBean($codes);

echo json_encode($prize);
?>